package com.zxw.controller;


import com.zxw.service.IAccountTblService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zxw
 * @since 2020-10-16
 */
@RestController
@RequestMapping("/account-tbl")
public class AccountTblController {
    @Autowired
    private IAccountTblService accountService;

    @RequestMapping(value = "/reduce", produces = "application/json")
    public Boolean debit(String userId, int money) {
        accountService.reduce(userId, money);
        return true;
    }
}
